﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace B2BClient
{
    /// <summary>
    /// From for startup
    /// </summary>
    public partial class StartupForm : Form
    {
        /// <summary>
        /// Functions to initialise the startup form
        /// </summary>
        public StartupForm()
        {
            InitializeComponent();
            B2BCore.LogHelper.Log("B2BClient", System.Diagnostics.TraceEventType.Start);
        }

        private void MainForm_FormClosed(object sender, FormClosedEventArgs e)
        {
            B2BCore.LogHelper.Log(string.Format("B2BClient Closed: {0}", e.CloseReason), System.Diagnostics.TraceEventType.Stop);
        }

        private void MainForm_Load(object sender, EventArgs e)
        {
            //load server list
            GlobalFunctions.populateServerList();

            //on form load show the login screen + log
            B2BCore.LogHelper.Log("Loaded, showing Login Form", System.Diagnostics.TraceEventType.Transfer);
            Form login = new Login();
            login.ShowDialog();
        }
    }
}
